﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.ComponentModel;

namespace ProjectA.Controls
{
    public class cComboBox : ComboBox
    {
        public cComboBox(Point pPoint, Size sSize)
        {
            Location = pPoint;
            Size = sSize;
            Design();
        }

        public cComboBox()
        {
        }

        private void Design()
        {
            DropDownStyle = ComboBoxStyle.DropDownList;
            Font = new Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            FormattingEnabled = true;
            Margin = new System.Windows.Forms.Padding(0);
        }

        public void setDataSource(BindingSource dataSource, string sDisplayMember)
        {
            DataSource = dataSource;
            DisplayMember = sDisplayMember;
        }

        /*[Browsable(false)]
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;
                cp.ExStyle |= 0x20;
                return cp;
            }
        }*/
    }
}
